/**
 * 
 */

//分页参数 每页多少个数据
window.pageSize = 7;


//时间戳转成精确到秒的字符串
window.getTime=function(stamp){
	if(stamp == "" || stamp == null){
		return "";
	}
	var dates = new Date(stamp.replace(/-/g, "/"));
//	var dates = new Date(stamp);
	var yy = dates.getFullYear();  //年
	var mm = dates.getMonth() + 1;  //月
	var dd = dates.getDate();  //日
//	var hh = dates.getHours();  //时
	var clock = yy + "-";
	if(mm < 10) clock += "0";
	clock += mm + "-";
	if(dd < 10) clock += "0";
	clock += dd + " ";
	return clock;
};

//OKR时间显示
window.okrTime = function(year,quarter,month){
	
	var date = "";
	
	if(year != "" && month != "" && quarter != ""){
		
		date = year + "-" + quarter + "-" + month;
		
	}else if(year != "" && month != ""){
		
		date = year + "-" + month;
		
	}else if(year != "" && quarter != ""){
		
		date = year + "-" + quarter;
		
	}else if(quarter != "" && month != ""){
		
		date = quarter + "-" + month;
		
	}else if(quarter != ""){
		
		date = quarter;
		
	}else if(month != ""){
		
		date = month;
		
	}
	
	return date;
}